﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>设计报表</title>
    <script src="/jslib/jquery-3.4.1.min.js"></script>
    <script src="/jslib/lobster.js"></script>
    <script src="/jslib/CreateControl.js"></script>
    <style>
        html, body {
            margin: 0;
            height: 100%;
        }
    </style>
</head>
<body>

</body>
</html>
<script type="text/javascript">
    lobstercommon.name = "lobsterlayui";
    var appid = lobstercommon.GetUrlParam("appid");
    var id = lobstercommon.GetUrlParam("id");
    var access_token = lobstercommon.GetSSOToken();
    var _reportURL = "/report/v1/reportdata/GetReportFile?Id=" + id;
    var _dataURL = "/report/v1/reportdata/GetReportDataSource?Id=" + id + "&access_token=" + access_token;
    var _saveURL = "report/v1/reportdata/SaveReportFile?Id=" + id;
    var args = {
        report: _reportURL,
        data: _dataURL,
        exparams: "<param name=OnSaveReport value=OnSaveReport>",
        saveurl: _saveURL
    };
    InsertDesigner(args);
    //点击工具栏保存按钮响应的事件函数，用以保存设计结果
    function OnSaveReport() {
        //注释掉下面第一行代码，并取消第二行代码的注释，即可将设计结果保存到服务器对应目录下的文件中
        //alert("为了保护报表的正常演示，这里放弃了对报表设计的保存！");
        //alert("保存成功！");
        AjaxDesignerSave(ReportDesigner, ReportDesigner.SaveReportURL);
        ReportDesigner.DefaultAction = false;
    }
</script>